<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <script src="jquery-3.2.1.js"></script>
</head>
<body>
<input type="button" value="点击" id="btn">
<script>
  $(function () {
    $('#btn').click(function () {
      $.ajax({
        url: "01data.php",
        dataType: "json",
        type: 'get',
        success: function (data) {
          alert(data);
        }, error: function (e) {
          console.log(e);

        }
      });
    });
  });
</script>
</body>
</html>